home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 40
/
040.d81
/
math help
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
1KB
|
71 lines
5 poke53280,.:poke53281,.:print"[147]"
10 gosub 210
11 gosub 470
90 print"[147]"chr$(142)
100 print" euclid's greatest common"
110 print" factor finder ... liz deal[154]"
120 a=1221:b=2553:va=a:vb=b
130 print" [155]a"," b","ratio","remainder[154]"
140 ra=int(a/b)
150 r=a-ra*b:printa,b,ra,r
160 ifr>0thena=b:b=r:goto140
170 print"[159] gcf[152]="b
180 print"[159] a/gcf[152]="va/b
190 print"[159] b/gcf[152]="vb/b
200 print"[158] press space to continue"
201 geta$:ifa$<>" "then 201
205 goto11
210 print"[147]"
220 print" [158]L O A D S T A R"
230 print" [152][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
240 print
250 print" [159]Presents"
260 print
270 print
280 print
290 print" EUCLID'S GREATEST COMMON"
300 print
310 print" FACTOR[160]FINDER"
320 print
330 print
340 print
350 print" [154]Written By [159]Liz Deal"
360 print
370 print
380 print
390 print" [156]Copyright 1987"
400 print
410 print
420 print" Press [153]SPACE To Continue"
430 print
440 print
450 print"";
460 geta$:ifa$<>" "then460
465 return
470 print"[147]"
480 print
490 print
500 print
510 print" EUCLID'S GREATEST COMMON"
520 print" FACTOR FINDER"
530 print" [152]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}"
540 print
550 print" 1[155]) [154]Run Routine."
560 print
570 print
580 print" 2[155]) [154]QUIT to [158]LOADSTAR"
590 print
600 print" [153][197]nter [211]election [155](1 [153][207]r 2[155]) "
630 geta$:ifa$=""then630
640 ifa$="1"then return
650 ifa$="2"then 800
660 goto 630
800 print"[145][158] [196]o [217]ou [215]ish [212]o [209]uit? ([217]/[206])"
801 geta$:ifa$=""then801
805 ifa$="y"ora$="[217]"then850
806 ifa$="[206]"ora$="n"thenprint"[145]";:goto600
807 goto 801
850 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
851 ifer<>63 then print"[147]":end
852 load"hello connect",8,1